import java.util.Scanner;

/**
 * Created by dllo on 18/3/31.
 */
public class Test04 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("输入任意三位数");
        int abc = scanner.nextInt();
        int a = abc / 100;//求出百位数
        int b = abc % 100 / 10;//求出十位数
        int c = abc % 100 % 10;//求出个位数
        if (abc == a * a * a + b * b * b + c * c * c)
            System.out.println("这个数是水仙花数");
        else {
            System.out.println("这个数不是水仙花数");
        }

    }
}
